]> dgit.raspbian.org Git - gnome-shell.git/commitdiff
search: Use async API in search result implementation
authorMarco Trevisan (Treviño) <mail@3v1n0.net>
Mon, 16 Feb 2026 20:25:36 +0000 (21:25 +0100)
committerMarge Bot <marge-bot@gnome.org>
Tue, 17 Feb 2026 14:00:13 +0000 (14:00 +0000)
SearchResultsBase.updateSearch is an async function but we do not
implement it in the same way in GridSearchResults.

While this is not wrong per se, it makes it harder to follow the chain
and potentially to handle the errors

Part-of: <https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/4080>

js/ui/search.js

index 897bae5b9abf909de98cf6bd4540aeb6df38d622..32a934f435fbb18044bb8223aaa5af0a8af26747 100644 (file)
@@ -497,7 +497,7 @@ class GridSearchResults extends SearchResultsBase {
         super._onDestroy();
     }
 
-    updateSearch(...args) {
+    async updateSearch(...args) {
         if (this._notifyAllocationId)
             this.disconnect(this._notifyAllocationId);
         if (this._updateSearchLater) {
@@ -519,7 +519,7 @@ class GridSearchResults extends SearchResultsBase {
             });
         });
 
-        super.updateSearch(...args);
+        await super.updateSearch(...args);
     }
 
     _getMaxDisplayedResults() {